package kotan.util;

import kotan.AppEngineEnv;
import kotan.Kotan;
import kotan.datastore.api.Key;

public class KeyFactory {

    public static Key createKey(String kind, long id) {
        AppEngineEnv env = Kotan.get().getEnv();
        return new Key(env.getApplicationId(), env.getNameSpace(), kind, id);
    }

    public static Key createKey(String kind, String name) {
        AppEngineEnv env = Kotan.get().getEnv();
        return new Key(env.getApplicationId(), env.getNameSpace(), kind, name);
    }

    KeyFactory() {
    }

}
